
<form class="layui-form pt10" action="{:url()}" method="post" id="editForm">
    <div class="layui-form-item">
        <label class="layui-form-label">费用日期</label>
        <div class="layui-input-inline">
            <input type="text" id="date" class="layui-input field-usetime" name="usetime"  lay-verify="required" autocomplete="off" ">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">门店</label>
        <div class="layui-input-inline">
            <select name="shop_id" class="layui-input field-shop_id" lay-verify="required" lay-search="">
              <option value="">直接选择或搜索选择</option>
              {$shops|raw}
            </select>
        </div>
        <div class="layui-form-mid layui-word-aux"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">提交人</label>
        <div class="layui-input-inline">
            <select name="admin_id" class="layui-input field-admin_id" lay-verify="required" lay-search="">
              <option value="">直接选择或搜索选择</option>
              {$admins|raw}
            </select>
        </div>
        <div class="layui-form-mid layui-word-aux"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">报销内容</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-title" name="title"  lay-verify="required" autocomplete="off" ">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">报销分类</label>
        <div class="layui-input-inline w200">
            <select name="class_id" class="field-class_id" type="select" lay-verify="required">
                <option value="">请选择分类</option>
                {$category|raw}
            </select>
        </div>
        <div class="layui-form-mid layui-word-aux"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">金额</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-price" name="price"  lay-verify="number" autocomplete="off" ">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-bak" name="bak" lay-verify="" autocomplete="off" ">
        </div>
    </div>
    {if $formData}
    <div class="layui-form-item">
        <label class="layui-form-label">支出账户</label>
        <div class="layui-input-inline w200">
            <select name="account_id" class="field-account_id" type="select" lay-verify="">
                <option value="">请选择分类</option>
                {$accounts|raw}
            </select>
        </div>
        <div class="layui-form-mid layui-word-aux">支出请勿选择用户余额！</div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">审核结果</label>
        <div class="layui-input-inline">
            <input type="radio" class="field-status" name="status" value="2" title="通过"  checked>
            <input type="radio" class="field-status" name="status" value="3" title="不通过">
        </div>
    </div>
    <input type="hidden" class="field-finance_id" name="finance_id" value="{:ADMIN_ID}">
    {/if}
    <div class="layui-form-item">
        <div class="layui-input-block">
            <input type="hidden" class="field-id" name="id">
            <input type="hidden" class="field-sn" name="sn" value="{:$formData ? $formData['sn'] : create_order_sn()}">
        </div>
    </div>
    <div class="pop-bottom-bar hisi-footer">
        <button type="submit" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="formSubmit" hisi-data="{pop: true, refresh: true}">提交保存</button>
        <a href="javascript:parent.layui.layer.closeAll();" class="layui-btn layui-btn-primary ml10">取消</a>
    </div>
</form>
<!-- <script src="__PUBLIC_JS__/layui/xm-select.js" charset="utf-8"></script> -->
{include file="system@block/layui" /}

<script>

layui.use(['func','laydate'], function() {
    //常规用法
    var laydate = layui.laydate;



    layui.func.assign({:json_encode($formData)});
    laydate.render({
          elem: '#date',
          trigger:'click',
          type:'date'
        });

});
</script>
